add_swift_host_library(swiftIRGen STATIC
  AllocStackHoisting.cpp
  ClassLayout.cpp
  DebugTypeInfo.cpp
  EnumPayload.cpp
  ExtraInhabitants.cpp
  Fulfillment.cpp
  GenArchetype.cpp
  GenBuiltin.cpp
  GenCall.cpp
  GenCast.cpp
  GenClangDecl.cpp
  GenClangType.cpp
  GenClass.cpp
  GenConstant.cpp
  GenControl.cpp
  GenCoverage.cpp
  GenDecl.cpp
  GenDiffWitness.cpp
  GenEnum.cpp
  GenExistential.cpp
  GenFunc.cpp
  GenHeap.cpp
  GenInit.cpp
  GenIntegerLiteral.cpp
  GenKeyPath.cpp
  GenMeta.cpp
  GenObjC.cpp
  GenOpaque.cpp
  GenPoly.cpp
  GenProto.cpp
  GenReflection.cpp
  GenStruct.cpp
  GenThunk.cpp
  GenTuple.cpp
  GenType.cpp
  GenValueWitness.cpp
  IRGen.cpp
  IRGenDebugInfo.cpp
  IRGenFunction.cpp
  IRGenMangler.cpp
  IRGenModule.cpp
  IRGenSIL.cpp
  Linking.cpp
  LoadableByAddress.cpp
  LocalTypeData.cpp
  MetadataLayout.cpp
  MetadataRequest.cpp
  Outlining.cpp
  StructLayout.cpp
  SwiftTargetInfo.cpp
  TypeLayout.cpp
  TypeLayoutDumper.cpp
  TypeLayoutVerifier.cpp

  LLVM_LINK_COMPONENTS
    target
    transformutils
)
target_link_libraries(swiftIRGen INTERFACE
  clangCodeGen
  clangAST)
target_link_libraries(swiftIRGen PRIVATE
  swiftAST
  swiftLLVMPasses
  swiftSIL
  swiftSILGen
  swiftSILOptimizer)
